import request from '@/utils/request'

// 课程分类列表
export function courseClassifyList(query) {
  return request({
    url: '/jbl-business/api/admin/v1/category/select/page',
    method: 'get',
    params: query
  })
}

// 课程分类删除
export function courseClassifyDel(query) {
  return request({
    url: '/jbl-business/api/admin/v1/category/deleteById',
    method: 'get',
    params: query
  })
}

// 课程分类详情
export function courseClassifyDetail(query) {
  return request({
    url: '/jbl-business/api/admin/v1/category/getById',
    method: 'get',
    params: query
  })
}

// 课程分类编辑
export function courseClassifyUpdate(data) {
  return request({
    url: '/jbl-business/api/admin/v1/category/updateById',
    method: 'post',
    data
  })
}

// 课程分类添加
export function courseClassifyAdd(data) {
  return request({
    url: '/jbl-business/api/admin/v1/category/add',
    method: 'post',
    data
  })
}

// 课程性质列表
export function courseKindList(query) {
  return request({
    url: '/jbl-course/api/admin/v1/course/nature/pageList',
    method: 'get',
    params: query
  })
}

// 课程性质修改
export function courseKindUpdate(data) {
  return request({
    url: '/jbl-course/api/admin/v1/course/nature/updateById',
    method: 'post',
    data
  })
}

// 课程性质详情
export function courseKindDetail(query) {
  return request({
    url: '/jbl-course/api/admin/v1/course/nature/getById',
    method: 'get',
    params: query
  })
}

// 课程性质新增
export function courseKindAdd(data) {
  return request({
    url: '/jbl-course/api/admin/v1/course/nature/add',
    method: 'post',
    data
  })
}

// 课程标签列表
export function courseLabelList(query) {
  return request({
    url: '/jbl-course/api/admin/v1/courseLabel/pageList',
    method: 'get',
    params: query
  })
}

// 课程标签删除
export function courseLabelDel(query) {
  return request({
    url: '/jbl-course/api/admin/v1/courseLabel/deleteById',
    method: 'get',
    params: query
  })
}

// 课程标签详情
export function courseLabelDetail(query) {
  return request({
    url: '/jbl-course/api/admin/v1/courseLabel/getById',
    method: 'get',
    params: query
  })
}

// 课程标签修改
export function courseLabelUpdate(data) {
  return request({
    url: '/jbl-course/api/admin/v1/courseLabel/updateById',
    method: 'post',
    data
  })
}

// 课程标签新增
export function courseLabelAdd(data) {
  return request({
    url: '/jbl-course/api/admin/v1/courseLabel/add',
    method: 'post',
    data
  })
}

// 课程管理分页查询
export function courseManagementList(query) {
  return request({
    url: '/jbl-course/api/merchant/v1/course/pageList',
    method: 'get',
    params: query
  })
}

// 更新课程保障计划状态
export function upDateCourseSecuityStatus(query) {
  return request({
    url: '/jbl-course/api/admin/v1/course/updateSecurityPlan',
    method: 'get',
    params: query
  })
}

// 查询单个课程详情
export function getSingleCourseDetail(query) {
  return request({
    url: '/jbl-course/api/merchant/v1/course/getBoById',
    method: 'get',
    params: query
  })
}

// 查询已认证机构
export function courseBusinessList(query) {
  return request({
    url: '/jbl-business/api/admin/v1/business/selectByConditions',
    method: 'get',
    params: query
  })
}

// 课程列表查询
export function getCourseLists(query) {
  return request({
    url: '/jbl-course/api/merchant/v1/course/pageList',
    method: 'get',
    params: query
  })
}
